<?php

namespace app\common\model;

use think\Model;

class Menu extends Model
{
    public static function getMenusByLevel($level = 1)
    {
        return self::where('level', $level)->select();
    }

    public static function getMenusByPid($pid)
    {
        return self::where('level', 2)->where('pid', $pid)->select();
    }
}
